package com.woniuxy.escort.mapper;

import com.woniuxy.commons.entity.Escort;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

@Mapper
public interface EscortMapper {
    @Cacheable(value = "findAllEscort")
    List<Escort> findAllEscort();

    Boolean addEscort(Escort escort);

    Boolean delEscortByUid(int uid);

    Escort findEscortByUid(int uid);

    Boolean updateEscort(Escort escort);

    List<Escort> findEscortByConditions(Escort escort);

    Boolean resetPassword(@Param("uid") int uid, @Param("password") String password);

    List<Escort> isExist(Escort escort);
}
